package com.huike.business.mapper;

import com.github.pagehelper.Page;
import com.huike.business.domain.TbBusiness;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.huike.business.domain.dto.TbBusinessPageDTO;
import com.huike.business.domain.vo.TbBusinessVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author 93238
 * @description 针对表【tb_business(商机)】的数据库操作Mapper
 * @createDate 2023-10-12 06:08:37
 * @Entity com.huike.business.domain.TbBusiness
 */
@Mapper
public interface TbBusinessMapper extends BaseMapper<TbBusiness> {

    //查询需要补全的数据
    Page<TbBusinessVO> findByCondition(TbBusinessPageDTO tbBusinessPageDTO);

    /**
     * 根据商机id集合修改状态
     *
     * @param business 商机的状态和修改时间
     * @param ids      商机id集合
     */
    void updateStatusByIds(TbBusiness business, List<Long> ids);

    /**
     * 获取需要转派的商机
     *
     * @param userId 从哪个用户转派出去
     */
    List<TbBusiness> getTransferBusinessListByUserId(Long userId);

    /**
     * 查找公海池
     * @param tbBusinessPageDTO
     * @return
     */
    Page<TbBusinessVO> findPoolByCondition(TbBusinessPageDTO tbBusinessPageDTO);
}




